import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
Vue.use(ElementUI);
Vue.config.productionTip = false;


import * as API from '../http/api'


Vue.prototype.$API = API; //挂载

import {
  result
} from "lodash";
//引入富文本依赖
import VueQuillEditor from 'vue-quill-editor'
// 时间戳
import Moment from 'moment'
// 时间戳的过滤器
Vue.filter('detaTime', function (v) {
  console.log('时间', v);
  return Moment(v * 1000).format('YYYY年MM月DD日 hh-mm-ss')
})

// 统计表
import  * as  echarts from 'echarts'
Vue.prototype.$echarts = echarts


//导入富文本样式
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme

Vue.use(VueQuillEditor)

//定义等级过滤器
Vue.filter('rank', function (v) {
  console.log('v:', typeof v)

  v = v + ''

  let result

  switch (v) {
    case '0':
      result = '一级'
      break
    case '1':
      result = '二级'
      break
    case '2':
      result = '三级'
      break
    default:
      result = '没有此级别'
      break
  }

  return result
})

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");